#ifndef EPD_UI_H
#define EPD_UI_H

#include "gt30l32.h"
#include "epd_2in9.h"
#include <stdio.h>
#include <string.h>
#include "cardDataTypes.h"


typedef enum
{
  UI_FONT_7 = 0,
  UI_FONT_8,
  UI_FONT_12,
  UI_FONT_16,
  UI_FONT_24,
  UI_FONT_32
}UI_FontType;

typedef enum
{
  UI_PIXEL_BLACK = 0,
  UI_PIXEL_WHITE
}UI_PixelColor;

#define UI_ONLINE       1u
#define UI_OFFLINE      0u

void UI_DrawPixel(uint16_t x, uint16_t y, UI_PixelColor pixelColor);
void UI_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, UI_PixelColor pixelColor);
void UI_DrawHVLine(uint16_t x, uint16_t y, uint16_t len, uint8_t dir, UI_PixelColor pixelColor);
void UI_DrawBox(uint16_t x, uint16_t y, uint16_t w, uint16_t h, UI_PixelColor pixelColor);
void UI_DrawFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h, UI_PixelColor pixelColor);
void UI_DrawRBox(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t r, UI_PixelColor pixelColor);
void UI_DrawRFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t r, UI_PixelColor pixelColor);
void UI_DisplayStringToBuffer(const char* string, UI_FontType font, uint16_t x, uint16_t y, UI_PixelColor pixelColor);
void UI_DisplayString(const char *str,uint8_t font, uint8_t x, uint8_t y);
void UI_DisplayImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint8_t *image);
void UI_ClearScreen(void);

void UI_DisplayMainPage(const char* studentID, const char* studentSchool, const char* studentName, const char* message);
void UI_DisplayClassSchedule(ClassScheduleTypeDef* ClassSchedule);

#endif
